import http from '@/utils/http'
enum Api {
    loginApi = '/api/web/auth/login',
    accountDetail = '/api/system/authority/myAuthority',
    logout = "/api/web/auth/logout",
    sendMessage = "/api/sms/thirdParty/send"
}

export const loginGetApi = async (params: { username: string, password?: string,verificationCode?:string }) => {
    return http.post(Api.loginApi, params)
}
export const accountDetailGetApi = async () => {
    return http.get(Api.accountDetail)
}

export const logoutGetApi = async () => {
    return http.get(Api.logout)
}

// 发送短信
export const sendMessagePostApi = async (params: { username: string, password: string }) => {
    return http.post(Api.sendMessage, params)
}